<%-- 
    Document   : confirmorder
    Created on : 20-déc.-2012, 13:23:37
    Author     : Anthares
--%>

<%@page session="false" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="core" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@taglib tagdir="/WEB-INF/tags" prefix="jt" %>
<core:set var="pagename" scope="request" value="order"/>
<fmt:setLocale value="${requestScope.locale}"/>
<fmt:setBundle basename="Languages.lang"/>
<jt:layout pageTitle="Basket">
    <jsp:body>


        <table id="basket-content">
            <thead><tr>
                    <td></td>
                    <td><fmt:message key="basket.head.article"/></td>
                    <td><fmt:message key="basket.head.amount"/></td>
                    <td><fmt:message key="basket.head.unitprice"/></td>
                    <td><fmt:message key="basket.head.subtotal"/></td>
                </tr></thead>
                <core:forEach items="${pageContext.request.getSession(false).getAttribute('basket').lines}" var="item">
                <tr>
                    <td><img src="<core:url value="${item.value.product.image}"/>"</td>
                    <td>${item.value.product.traduction.libelle}</td>
                    <td>${item.value.quantity}</td>
                    <td><fmt:formatNumber value="${item.value.product.reducedPrice}" type="currency"/></td>
                    <td><fmt:formatNumber value="${item.value.linePrice}" type="currency"/></td>
                </tr>
            </core:forEach>
            <tfoot>
                <tr><td colspan="5"><fmt:message key="basket.total"/> : <fmt:formatNumber value="${pageContext.request.getSession(false).getAttribute('basket').sum}" type="currency"/></td></tr>
            </tfoot>
        </table>

        <p><fmt:message key="order.confirm.ask"/></p>
        <p><a class="button" href="<core:url value="/basket"/>"><fmt:message key="order.confirm.cancel"/></a> <a class="button" href="<core:url value="/order/confirm"/>"><fmt:message key="order.confirm.go"/></a></p>
    </jsp:body>
</jt:layout>